<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.vsg.stock.basic.domain.mybatis.StockBlurRangeProxy">


	<resultMap id="StockBlurRangeResult" type="org.vsg.stock.basic.domain.mybatis.StockBlurRangeProxy">
		<id property="id.stockCode" column="STOCK_CODE" />
		<id property="id.upperLimit" column="UPPER_LIMIT" />
		<id property="id.lowerLimit" column="LOWER_LIMIT" />
		<result property="upperPrecent" column="UPPER_PRECENT"/>
		<result property="lowerPrecent" column="LOWER_PRECENT"/>
	</resultMap>

	<select id="findAllByStock" parameterType="map" resultMap="StockBlurRangeResult">
  		select RANGE.STOCK_CODE , RANGE.UPPER_LIMIT , RANGE.LOWER_LIMIT , RANGE.UPPER_PRECENT
  			, RANGE.LOWER_PRECENT
   			from STOCK_BLUR_RANGE AS RANGE 
  		where STOCK_CODE=#{stockCode} ORDER BY LOWER_LIMIT ,UPPER_LIMIT
 	</select>	


</mapper>
